package com.norma.macaron.service.common.client.user;

import com.norma.macaron.service.common.domain.auth.UserExt;
import com.norma.macaron.common.model.response.ResponseT;
import com.norma.macaron.service.common.domain.user.TUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

@FeignClient(name = "macaron-user")
public interface UserServiceClient {
    @PostMapping("/v1.0/user/sayHello")
    Map<String,Object> sayHello(@RequestParam("userName") String userName);

    @GetMapping("/v1.0/user/getuserext")
    UserExt getUserext(@RequestParam("username") String username);

    @GetMapping("/v1.0/user/getUserById")
    ResponseT<TUser> getUserById(@RequestParam("userId") Long userId);

    @PostMapping("/v1.0/user/getUserExtByPhone")
    UserExt getUserExtByPhone(@RequestParam("phone") String phone);
}
